package cn.xiaopengstack.infrastructure.dao;

import cn.xiaopengstack.infrastructure.dao.po.AiClientConfig;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author jiangyangang
* @description 针对表【ai_client_config(AI客户端统一关联配置表)】的数据库操作Mapper
* @createDate 2025-08-29 15:15:19
* @Entity cn.xiaopengstack.infrastructure.dao.po.AiClientConfig
*/
public interface AiClientConfigMapper {

    int deleteByPrimaryKey(Long id);

    int insert(AiClientConfig record);

    int insertSelective(AiClientConfig record);

    AiClientConfig selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AiClientConfig record);

    int updateByPrimaryKey(AiClientConfig record);

    /**
     * 查询配置
     * @param sourceType
     * @param sourceId
     * @return
     */
    List<AiClientConfig> queryBySourceTypeAndId(@Param("sourceType") String sourceType, @Param("sourceId") String sourceId);

    /**
     * 查询依赖项
     * @param sourceType
     * @param sourceId
     * @param targetType
     * @return
     */
    List<AiClientConfig> queryBySourceAndTarget(@Param("sourceType") String sourceType, @Param("sourceId") String sourceId, @Param("targetType") String targetType);
}
